package com.xrkj.miniprogram.server.service;

import com.xrkj.miniprogram.server.entity.DigitalCategory;
import com.xrkj.miniprogram.server.mapper.DigitalCategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class DigitalCategoryService {
    @Autowired
    DigitalCategoryMapper digitalCategoryMapper;

    @Transactional
    public void addCategory(String categoryName){//添加分类
        DigitalCategory digitalCategory=new DigitalCategory();
        digitalCategory.setName(categoryName);
        digitalCategoryMapper.insert(digitalCategory);
    }


    public void readCategory() {

    }

}
